<?php
namespace valid;
use think\Validate;


class User extends Validate
{
    protected $rule = [
        'username'  =>  'require|length:11|number',
        'password'  =>  'require|min:6',
    ];

    protected $message  =   [
        'username.require' => '手机号码必须填写',
        'username.length'  => '手机号码错误',
        'username.number'  => '手机号码错误',
        'password.require' => '密码必须填写',
        'password.min'     => '密码最短为6位', 
    ];
}
